import Vue from 'vue'
import Router from 'vue-router'
import Layout from '@/components/Layout'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Layout',
      component: Layout,
      //重定向到list
      redirect: "list",
      children: [
        {
          path: 'list',
          name: 'list', 
          component: () => import("@/view/List"),
          },
          {
          path: 'userlist',
          name: 'userlist', 
          component: () => import("@/view/user/UserList"),
          },
          {
            path: 'userinfolist',
            name: 'userinfolist', 
            component: () => import("@/view/user/UserInfo"),
          },
          {
            path: 'typelist',
            name: 'typelist',
            component: () => import("@/view/vaccinum/TypeList"),
          },
          {
            path: 'vaccinumList',
            name: 'vaccinumList',
            component: () => import("@/view/vaccinum/VaccinumList"),
          },
          {
            path: 'login',
            name: 'login',
            component: () => import("@/view/Login"),
          },
      ]
    },
    
  ]
  
})
